package com.allwees.bs.module.oms.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.allwees.bs.module.lms.vo.TrackDetailsDto;
import com.allwees.bs.module.oms.entity.OmsOrderItem;
import com.allwees.bs.module.oms.req.query.OmsOrderItemQueryReq;
import com.allwees.bs.module.oms.vo.TrackingDetailVo;

import java.util.List;
import java.util.Set;

public interface GeneralOmsOrderItemService extends BaseOmsOrderItemService {

    /**
     * 转为待结算
     *
     * @return
     */
    void doSettle(Set<String> orderItemUuids);

    /**
     * 执行结算
     *
     * @return
     */
    void doSettled(OmsOrderItem omsOrderItem,boolean exceedSettleDate);

    /**
     * 执行结算
     *
     * @param branchUuid
     * @return
     */
    OmsOrderItem doSettled(OmsOrderItem omsOrderItem,String branchUuid, boolean exceedSettleDate);

    /**
     *
     * @param orderUuid
     * @return
     */
    List<OmsOrderItem> findByOrderUuid(String orderUuid);

    /**
     *
     * @param orderItemUuid
     */
    void doApplyRefund(String orderItemUuid);

    /**
     *
     * @param orderItemUuid
     * @param isApproved
     */
    void doRefunded(String orderItemUuid, boolean isApproved);

    /**
     *
     * @param orderItemUuid
     */
    void doRefundedByRetailer(String orderItemUuid);

    /**
     *
     * @param omsOrderItem
     */
    void doRefundedByPlatform(OmsOrderItem omsOrderItem);

    /**
     * 评论
     * @param orderItemUuid
     */
    void doReviewed(String orderItemUuid);

    /**
     * 取消订单
     *
     * @param orderItemUuid
     */
    void doCanceled(String orderItemUuid);

    /**
     * 查物流进度信息
     * @param orderItemUuid
     * @return
     */
    TrackingDetailVo queryTrackingDetail(String orderItemUuid);

    /**
     *  妥投(定时任务)
     */
    void doDelivered(String orderItemUuid, TrackDetailsDto tracking);

    /**
     * webhook回调
     * @param expressCode
     * @param carrierCode
     */
    void doDelivered(String expressCode, String carrierCode);
}
